<?php
$vars['helper']->setContainerClass('');
$vars['helper']->insertMessage();
$actionLink = $vars['actionLink'];
$imageSrcLink = $vars['imageSrcLink'];
$imageLink = $vars['imageLink'];

$vars['helper']->setTitle(__('Avatar crop'));
$userId = $vars['userId'];
?>


<div id="link-back">
<a class="button" 
	href="<?php echo $vars['helper']->createHref('Home')?>">
		<?php echo __('Home'); ?>
</a>
<a class="button" 
	href="<?php $vars['helper']->insertHrefWithNonce('displayProfile', 'Profile', 'display', array('userId'=>$userId )); ?>">
		<?php echo __('Profile'); ?>
</a>
<a class="button" 
	href="<?php $vars['helper']->insertHrefWithNonce('displayEditAvatarForm', 'Profile', 'displayEditAvatarForm', array('userId'=>$userId )); ?>">
		<?php echo __('Avatar'); ?>
</a>
&nbsp;
<h4> <?php echo __('Crop Your New Avatar'); ?></h4>
</div>

<form action="<?php echo $actionLink?>" id="avatar_crop" method="post" onSubmit="return checkCoords();">
	<img src="<?php echo $imageLink; ?>" id="avatar-to-crop" class="avatar" alt="<?php echo __( 'Avatar to crop' ) ?>" />

	<div id="avatar-preview-container">
		
		<div class="avatar-padding">
			<div id="avatar-crop-pane" class="resizable size_35">
				<!-- en 35, login panel -->
				<img src="<?php echo $imageLink; ?>" id="" class="avatar-crop-preview avatar" alt="<?php echo __( 'Avatar preview') ?>" />
			</div>
		</div>
		
		<div class="avatar-padding">
			<div id="avatar-crop-pane" class="resizable size_60">
				<!-- en 60, post author -->
				<img src="<?php echo $imageLink; ?>" id="" class="avatar-crop-preview avatar" alt="<?php echo __( 'Avatar preview') ?>" />
			</div>
		</div>

		<div class="avatar-padding">
			<div id="avatar-crop-pane" class="resizable size_75">
				<!-- en 75, profile page AND topic author AND feedback form -->
				<img src="<?php echo $imageLink; ?>" id="" class="avatar-crop-preview avatar" alt="<?php echo __( 'Avatar preview') ?>" />
			</div>
		</div>
		<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php echo __( 'Crop Image' ) ?>" />
	</div>


	<input type="hidden" name="image_src" id="image_src" value="<?php echo $imageSrcLink; ?>" />
	<input type="hidden" id="x" name="x" />
	<input type="hidden" id="y" name="y" />
	<input type="hidden" id="w" name="w" />
	<input type="hidden" id="h" name="h" />
</form>
